package 单if;
/*
    三位数求每一位的数字
*/
import java.util.Scanner;

public class test01 {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);//键盘录入
        System.out.println("请输入一个三位数:");
        int num = sc.nextInt();
        if(num>=100 && num<=999){
            int bai = num/100%10;
            int shi = num/10%10;
            int ge = num%10;
            System.out.println("百位数是："+bai);
            System.out.println("十位数是："+shi);
            System.out.println("个位数是："+ge);

        }
        System.out.println("结束");
    }



}